﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using JsonEditor.Models;

namespace JsonEditor.Extensions
{
    public static class ObjectEx
    {
        public static JsonNode ToJsonNode(this TreeNode treeNode)
        {
            return new JsonNode
            {
                Key = treeNode.Name,
                Value = treeNode.Tag
            };
        }
    }
}
